home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / ifl_c / iflConfig.z / iflConfig
Encoding:
Text File  |  1998-10-30  |  7.0 KB  |  199 lines

  1.  
  2.  
  3.  
  4. iiiiffffllllCCCCoooonnnnffffiiiigggg((((3333))))      IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll       iiiiffffllllCCCCoooonnnnffffiiiigggg((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      iiiiffffllllCCCCoooonnnnffffiiiigggg - class for pixel abstraction
  10.  
  11. IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
  12.      This is a base class and therefore has no inheritance.
  13.  
  14. HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
  15.      #include <ifl/iflCdefs.h>
  16.  
  17. CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      The iflConfig class is used to describe the configuration of pixel data.
  19.      It is used in iflFile functions such as iiiiffffllllGGGGeeeettttTTTTiiiilllleeee(((()))) and iiiiffffllllSSSSeeeettttTTTTiiiilllleeee(((()))) to
  20.      describe the configuration of data in the user's buffer.
  21.  
  22.      An iflConfig contains six public member variables describing a collection
  23.      of pixels:
  24.  
  25.  
  26.           iiiiffffllllTTTTyyyyppppeeee _d_t_y_p_e               Data type of the pixels
  27.  
  28.           iiiiffffllllOOOOrrrrddddeeeerrrr _o_r_d_e_r              Order of the pixels
  29.  
  30.           iiiiffffllllOOOOrrrriiiieeeennnnttttaaaattttiiiioooonnnn _o_r_i_e_n_t_a_t_i_o_n  Orientation of the pixels
  31.  
  32.           iiiinnnntttt _n_c_h_a_n_s                  Number of data channels the pixels
  33.                                       contain
  34.  
  35.           iiiinnnntttt _c_h_o_f_f                   Offset in the channel list for the
  36.                                       purpose of mapping from one collection
  37.                                       of channels to another.
  38.  
  39.           iiiinnnntttt**** _c_h_a_n_n_e_l_s               List that maps channels from one
  40.                                       collection to another.  This array is
  41.                                       not maintained by this object, the data
  42.                                       pointed to must persist while the object
  43.                                       is in use.
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. iiiiffffllllCCCCoooonnnnffffiiiigggg((((3333))))      IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll       iiiiffffllllCCCCoooonnnnffffiiiigggg((((3333))))
  71.  
  72.  
  73.  
  74.      UUUUssssiiiinnnngggg iiiiffffllllCCCCoooonnnnffffiiiigggg
  75.  
  76.      The iflConfig object contains a list that maps channels from one
  77.      collection to another.  In this code fragment,
  78.  
  79.           unsigned char buffer[10*10*3];
  80.           static int list[] = { 2, 1, 0 };
  81.           iflConfig cfg(iflUChar, iflInterleaved, 3, list);
  82.  
  83.           someFile.getTile(0, 0, 0, 10, 10, 1, buffer, &cfg);
  84.  
  85.      _c_f_g is used to indicate that _b_u_f_f_e_r is going to receive a 10-by-10 array
  86.      of three-component  pixels stored in interleaved order with an unsigned
  87.      char data type.  This would override the actual configuration of the data
  88.      in _s_o_m_e_F_i_l_e.
  89.  
  90.      The channel list provides the buffer's channel information. The first
  91.      channel of the buffer receives data from channel 2 of _s_o_m_e_F_i_l_e. The
  92.      second channel is from _s_o_m_e_F_i_l_e's channel 1. The third buffer channel
  93.      gets channel 0 of _s_o_m_e_F_i_l_e.  In general, when an iflConfig is defaulted,
  94.      the operation being performed assumes that the source and destination
  95.      configurations match.  If _s_o_m_e_F_i_l_e was actually a four-channel float
  96.      image stored in separate order, then
  97.  
  98.           someFile.getTile(0, 0, 0, 10, 10, 1, buffer);
  99.  
  100.  
  101.      would require a buffer declared as
  102.  
  103.           float buffer[10*10*4];
  104.  
  105.      and would receive a verbatim copy of the requested section of _s_o_m_e_F_i_l_e.
  106.  
  107. CCCCLLLLAAAASSSSSSSS MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN SSSSUUUUMMMMMMMMAAAARRRRYYYY
  108.      CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr
  109.  
  110.           iflConfig* iflConfigCreate(iflDataType type, iflOrder ord,
  111.                                      int nchan, int* chanList,
  112.                                      int chanOff, iflOrientation ori(0))
  113.  
  114.  
  115.      DDDDeeeessssttttrrrruuuuccccttttoooorrrr
  116.  
  117.           void iflConfigDelete(iflConfig *img)
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. iiiiffffllllCCCCoooonnnnffffiiiigggg((((3333))))      IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll       iiiiffffllllCCCCoooonnnnffffiiiigggg((((3333))))
  137.  
  138.  
  139.  
  140. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
  141.      iiiiffffllllCCCCoooonnnnffffiiiigggg(((())))
  142.  
  143.           iflConfig* iflConfigCreate(iflDataType type, iflOrder ord,
  144.                                      int nchan, int* chanList,
  145.                                      int chanOff, iflOrientation ori(0))
  146.  
  147.  
  148.           The constructor creates an iflConfig with data type, _t_y_p_e; data
  149.           ordering, _o_r_d_e_r; and channel list defined by _c_h_a_n_L_i_s_t of
  150.           _n_c channels.  If _c_h_a_n_L_i_s_t is omitted, all _n_c_h_a_n channels are used in
  151.           ascending order.  Optionally, the orientation is set to _o_r_i.  If
  152.           omitted, the orientation matches that of the image being accessed.
  153.  
  154.      iiiiffffllllCCCCoooonnnnffffiiiiggggDDDDeeeelllleeeetttteeee(((())))
  155.  
  156.           void iflConfigDelete(iflConfig *img)
  157.  
  158.  
  159.           Deletes an object of class iflConfig, thus freeing any associated
  160.           resources.
  161.  
  162. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  163.      iflFile
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.